package maitaole.result;

public enum ResultEnum implements IResult{
    ILLGEL_ERROR(false,444, "非法异常"),
    ADD_SUCCESS(true, 101, "新增成功"),
    ADD_ERROR(false, 102, "新增失败"), // errro   fail

    SELECTBYID_SUCCESS(true, 103,"主键查询成功"),
    SELECTBYID_ERROR(false, 104,"主键查询失败"),

    DELBYID_SUCCESS(true, 105,"主键删除成功"),
    DELBYID_ERROR(false, 106,"主键删除失败"),

    UPDATE_SUCESS(true,107,"更新成功"),
    UPDATE_ERROR(true,108,"更新失败")

    ;
    Boolean state;
    Integer code;
    String msg;


    ResultEnum(Boolean state, Integer code, String msg) {
        this.state = state;
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Boolean state() {
        return this.state;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String msg() {
        return this.msg;
    }
}

